//
// Created by wkm on 2023-12-06.
//

#include "alu.h"

void alu::prc_alu() {
    sc_uint<WORD> ta, tb;
    ta = a.read();
    tb = b.read();

    switch (op) {
        case add :
            z = ta + tb;
            break;
        case subtract :
            z = ta - tb;
            break;
        case multiply:
            z = ta * tb;
            break;
        case divide :
            z = ta / tb;
            break;
    }
}